home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / ACCESS_1.CMD next >
Encoding:
Text File  |  1996-02-15  |  1.7 KB  |  99 lines

  1. # Login script for Access Nevada, Boulder City, NV - PPP
  2. #trace on
  3. #
  4. # initialize modem
  5. #
  6. sleep 4
  7. output atz\r
  8. input 10 OK\n
  9. #
  10. # set modem to indicate DCD
  11. #
  12. outputecho ATX4&C1&D2S7=60S11=60M1L1\r
  13. input 10 OK\n
  14. #
  15. # send phone number & repeat if busy
  16. #
  17. $result = "StopWarningMsg"
  18. %connect = 0
  19. %attempts = 100
  20. %n = 0
  21. repeat
  22.   if %n = %attempts
  23.     display \n\n "Tried " %n " times, Giving up."\n
  24.     abort
  25.   end
  26.   %n = %n + 1
  27.   outputecho ATDT294-5348\r
  28.  
  29. #  %nothing = [input 1 nothing]
  30.   %timeout = [read 30 $result]
  31.  
  32. # This loop protects from a null string being interpreted as being 
  33. # a real answer.
  34.  
  35.   while $result = ""
  36.     %timeout = [read 30 $result]
  37.   end
  38.  
  39.   if %timeout = 0
  40.     display "ERROR: Timed-out with no answer." \n
  41.     set dtr off
  42.     sleep 1
  43.     output +++
  44.     sleep 1
  45.     output ath\r
  46.     set dtr on
  47.   end
  48.  
  49.   # Check if modem didn't even get a dialtone...
  50.  
  51.   if $result = "NO DIALTONE"
  52.     display $result\n
  53.     set dtr off
  54.     sleep 1
  55.     output +++
  56.     sleep 1
  57.     output ath\r
  58.     set dtr on
  59.     display "Stopped."\n
  60.     abort
  61.   end
  62.  
  63.   if $result = "BUSY"
  64.     %connect = 0
  65.   else
  66.     if %timeout = 0
  67.       display "Timeout."\n
  68.     else
  69.       display "Modem sez:" $result\n
  70.       %connect = 1
  71.       display "Connecting, waiting for prompt..."\n
  72.     end
  73.   end
  74.   sleep 2 
  75. until %connect
  76.  
  77. #
  78. # now we are connected.
  79. # wait till it's safe to send because some modem's hang up
  80. # if you transmit during the connection phase
  81. #
  82. #wait 60 dcd
  83.  
  84. display Connected to Access Nevada....
  85. #
  86. # send Login Id
  87. #
  88. input 20 : 
  89. output useridhere\r
  90. #
  91. # and the password
  92. #
  93. input 20 assword:
  94. output passwdhere\r
  95. #
  96. display \nPlease wait...\n
  97. sleep 6
  98.  
  99. input 30 Readyv